<?php


namespace App\Service;

use Illuminate\Database\Eloquent\Builder;
class ArticleService extends CommonService {


    public function __construct($model) {
        $this->instance = new $model();
    }

    public function lst(array $conditions): Builder {



        $records = parent::lst($conditions);
        return $records;
    }

    public function detail($id) {
        $record =  parent::detail($id);
        return $record;
    }

    public function getHot($classifyId,$limit) {
       return $this->instance->where('classify_id',$classifyId)->where('status',1)->orderByDesc('id')->limit($limit)->get();
    }




}
